﻿@inherits BComponentBase

@if (MyParameter.HasValue)
{
    <span>这是从父页面传过来的参数:@MyParameter</span>
}
<button @onclick="e=>closeMe()" class=" btn btn-success"> 关闭窗口</button>
@code {
    [Inject]
    DialogService dialogService { get; set; }
    [Parameter]

    public int? MyParameter { get; set; }
    [Parameter]
    public Action<MyDialog> myDialog { get; set; }
    private async Task closeMe()
    {
        myDialog.Invoke(this);
        //await dialogService.CloseDialogAsync(this, true);
    }
}